<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@include file="/header.jsp" %>
<%@taglib prefix="s" uri="/struts-tags"%>
			<div id="center">
				<div class="content">					
					<h2><fmt:formatDate value="${entry.createdTime}" pattern="yyyy年MM月dd日 "/></h2>
					<div class="entry">
						<h3>${entry.title}</h3>
							${entry.content}
							<p class="posted">
							    <a href="#">阅读(${entry.hits})</a>
								|<a href="#comments">评论(${entry.commentHit})</a>
								|<a href="${ctx}/list?cid=${entry.category.id}">${entry.category.name}</a>
								|<fmt:formatDate value="${entry.createdTime}" pattern="HH:mm:ss"/>
						</p>
					</div>
					<h2><a id="comments"></a>评论</h2>
					<c:forEach items="${comments}" var="c">										
						<p class=posted>
							<a href="mailto:${c.email}" target="_blank">${c.author}</a>
							|<fmt:formatDate value="${c.createdTime}" pattern="yyyy年MM月dd日 HH:mm:ss"/>						
						</p>
						<p>${c.content}</p>
					</c:forEach>
					
      				<!--判断博文是否允许评论  -->			
					<c:if test="${entry.allowComment==1}">
						<!--判断评论是否需要审核  -->
						<c:if test="${blog.commentAudit==1}">
	       				  	 （评论需要审核）
       					</c:if> 
						<s:form action="comment" validate="true">
							<s:hidden name="comment.entry.id" value="%{entry.id}" />
							<s:textfield label="作者" name="comment.author"/>
							<s:textfield label="email" name="comment.email"/>
							<s:textarea label="内容" name="comment.content" rows="4" cols="40"/>
							<s:submit value="提交"/>
						</s:form>
					</c:if>
				</div>				
			</div>
<%@include file="/footer.jsp" %>